package dreamtwodancetiktokenumsmysql

const (
	DanceLuckyDrawQualityTypeD   = 1
	DanceLuckyDrawQualityTypeC   = 2
	DanceLuckyDrawQualityTypeB   = 3
	DanceLuckyDrawQualityTypeA   = 4
	DanceLuckyDrawQualityTypeS   = 5
	DanceLuckyDrawQualityTypeSS  = 6
	DanceLuckyDrawQualityTypeSSS = 7
)

type DanceLuckyDrawQualityEnums struct {
}

var DanceLuckyDrawQualityEnumsObject DanceLuckyDrawQualityEnums

func (e DanceLuckyDrawQualityEnums) Quality() []int {
	return []int{
		DanceLuckyDrawQualityTypeD,
		DanceLuckyDrawQualityTypeC,
		DanceLuckyDrawQualityTypeB,
		DanceLuckyDrawQualityTypeA,
		DanceLuckyDrawQualityTypeS,
		DanceLuckyDrawQualityTypeSS,
		DanceLuckyDrawQualityTypeSSS,
	}
}

func (e DanceLuckyDrawQualityEnums) QualityMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.Quality() {
		m[s] = e.QualityString(s)
	}
	return m
}

func (e DanceLuckyDrawQualityEnums) QualityString(quality int) string {
	switch quality {
	case DanceLuckyDrawQualityTypeD:
		return "D"
	case DanceLuckyDrawQualityTypeC:
		return "C"
	case DanceLuckyDrawQualityTypeB:
		return "B"
	case DanceLuckyDrawQualityTypeA:
		return "A"
	case DanceLuckyDrawQualityTypeS:
		return "S"
	case DanceLuckyDrawQualityTypeSS:
		return "SS"
	case DanceLuckyDrawQualityTypeSSS:
		return "SSS"
	default:
		return "未知"
	}
}
